home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_200
/
221_01
/
cc5.asm
< prev
next >
Wrap
Assembly Source File
|
1980-01-01
|
21KB
|
1,959 lines
;small-c V2.3
EXT ccdiv,ccmult
EXT fopen,fclose,getc,putc,putchar,getchar,rewind,gets
EXT exit
EXT CCSWITCH
EXT CCPOLL
EXT isalpha,isupper,islower,isdigit,isspace
EXT toupper,tolower
EXT strlen,reverse,left,strcmp,strcpy
EXT abs,itoa,atoi,printf
EXT add
EXT and
EXT asl
EXT asr
EXT blanks
EXT ch
EXT clearsta
EXT div
EXT doublere
EXT eq
EXT ge
EXT getlabel
EXT gt
EXT heir7
EXT immed
EXT inbyte
EXT jump
EXT le
EXT loadsec
EXT lt
EXT match
EXT mod
EXT mult
EXT needbrac
EXT needlval
EXT ne
EXT nl
EXT or
EXT outdec
EXT outstr
EXT postlabe
EXT pop
EXT push
EXT pushsec
EXT rvalue
EXT setstage
EXT store
EXT streq
EXT sub
EXT testjump
EXT testnoop
EXT testtrue
EXT uge
EXT ugt
EXT ule
EXT ult
EXT xor
EXT lptr
EXT cptr
EXT line
NAME doexpres
GLOBAL doexpres
doexpres
LEAS -4,S
cc2
LDD #1
CMPD #0
LBEQ cc3
LEAY 2,S
TFR Y,D
PSHS D
LEAY 2,S
TFR Y,D
PSHS D
JSR setstage
LEAS 4,S
JSR expressi
LDD 2,S
PSHS D
LDD 2,S
PSHS D
JSR clearsta
LEAS 4,S
JSR ch
PSHS D
LDD #44
CMPD ,S++
LBEQ cc4
JMP cc3
cc4
JSR inbyte
JMP cc2
cc3
LEAS 4,S
RTS
GLOBAL expressi
expressi
LEAS -16,S
LEAY 0,S
TFR Y,D
PSHS D
JSR heir1
LEAS 2,S
CMPD #0
LBEQ cc5
LEAY 0,S
TFR Y,D
PSHS D
JSR rvalue
LEAS 2,S
cc5
LEAS 16,S
RTS
GLOBAL heir1
heir1
LEAS -20,S
LDD 22,S
PSHS D
LDD #2
PSHS D
ADDD ,S++
ADDD ,S++
PSHS D
LDD 24,S
PSHS D
LDD #3
PSHS D
ADDD ,S++
ADDD ,S++
PSHS D
LDD #1
STD [,S++]
STD [,S++]
LEAY 16,S
TFR Y,D
PSHS D
LDD 24,S
PSHS D
JSR heir1a
LEAS 2,S
STD [,S++]
JSR blanks
LEAY 18,S
TFR Y,D
PSHS D
LDD #line
ADDD lptr
STD [,S++]
LDD 18,S
PSHS D
LDD #cc1+0
PSHS D
JSR streq
LEAS 4,S
PSHS D
LDD #0
CMPD ,S++
LBNE cc6
LDD 18,S
PSHS D
LDD #cc1+3
PSHS D
JSR streq
LEAS 4,S
PSHS D
LDD #0
CMPD ,S++
LBNE cc7
LDD 18,S
PSHS D
LDD #cc1+6
PSHS D
JSR streq
LEAS 4,S
PSHS D
LDD #0
CMPD ,S++
LBNE cc8
LDD 18,S
PSHS D
LDD #cc1+9
PSHS D
JSR streq
LEAS 4,S
PSHS D
LDD #0
CMPD ,S++
LBNE cc9
LDD 18,S
PSHS D
LDD #cc1+12
PSHS D
JSR streq
LEAS 4,S
PSHS D
LDD #0
CMPD ,S++
LBNE cc10
LDD 18,S
PSHS D
LDD #cc1+15
PSHS D
JSR streq
LEAS 4,S
PSHS D
LDD #0
CMPD ,S++
LBNE cc11
LDD 18,S
PSHS D
LDD #cc1+19
PSHS D
JSR streq
LEAS 4,S
PSHS D
LDD #0
CMPD ,S++
LBNE cc12
LDD 18,S
PSHS D
LDD #cc1+23
PSHS D
JSR streq
LEAS 4,S
PSHS D
LDD #0
CMPD ,S++
LBNE cc13
LDD 18,S
PSHS D
LDD #cc1+26
PSHS D
JSR streq
LEAS 4,S
PSHS D
LDD #0
CMPD ,S++
LBNE cc14
LDD 18,S
PSHS D
LDD #cc1+29
PSHS D
JSR streq
LEAS 4,S
PSHS D
LDD #0
CMPD ,S++
LBNE cc15
JSR ch
PSHS D
LDD #61
CMPD ,S++
LBEQ cc16
LDD 16,S
LEAS 20,S
RTS
cc16
cc15
cc14
cc13
cc12
cc11
cc10
cc9
cc8
cc7
cc6
LDD 16,S
PSHS D
LDD #0
CMPD ,S++
LBNE cc17
JSR needlval
LDD #0
LEAS 20,S
RTS
cc17
LDD 22,S
PSHS D
LDD #1
PSHS D
ADDD ,S++
ADDD ,S++
PSHS D
LDD [,S++]
CMPD #0
LBEQ cc18
JSR push
JMP cc19
cc18
JSR ch
PSHS D
LDD #61
CMPD ,S++
LBEQ cc20
JSR immed
LDD 22,S
PSHS D
LDD [,S++]
ADDD #0
PSHS D
JSR outstr
LEAS 2,S
JSR nl
JSR push
cc20
cc19
LDD #cc1+32
PSHS D
JSR match
LEAS 2,S
CMPD #0
LBEQ cc21
LEAY 0,S
TFR Y,D
PSHS D
JSR heir1
LEAS 2,S
CMPD #0
LBEQ cc22
LEAY 0,S
TFR Y,D
PSHS D
JSR rvalue
LEAS 2,S
cc22
JMP cc23
cc21
LDD #cc1+34
PSHS D
JSR match
LEAS 2,S
CMPD #0
LBEQ cc24
LEAY 0,S
TFR Y,D
PSHS D
JSR heir1
LEAS 2,S
CMPD #0
LBEQ cc25
LEAY 0,S
TFR Y,D
PSHS D
JSR rvalue
LEAS 2,S
cc25
JSR loadsec
JSR pushsec
LDD 22,S
PSHS D
LDD #0
PSHS D
ADDD ,S++
ADDD ,S++
PSHS D
LDD [,S++]
STD cptr
CMPD #0
LBEQ cc26
LDD cptr
ADDD #9
PSHS D
LDB [,S++]
SEX
PSHS D
LDD #3
CMPD ,S++
BEQ *+8
LDD #0
JMP cc28 _
LDD #1
LDD cptr
ADDD #10
PSHS D
LDB [,S++]
SEX
PSHS D
LDD #2
PSHS D
LDD #2
DECB
BLT *+8
ASL 1,S
ROL ,S
BRA *-7
PULS D
CMPD ,S++
BEQ *+8
LDD #0
JMP cc28 _
LDD #1
LDD #1
cc28
CMPD #0
LBEQ cc29 _
LDD 22,S
PSHS D
LDD #2
PSHS D
ADDD ,S++
ADDD ,S++
PSHS D
LDD [,S++]
CMPD #0
LBEQ cc29 _
LDD #1
cc29
CMPD #0
LBEQ cc27
JSR doublere
cc27
cc26
JSR add
JMP cc30
cc24
LDD #cc1+37
PSHS D
JSR match
LEAS 2,S
CMPD #0
LBEQ cc31
LEAY 0,S
TFR Y,D
PSHS D
JSR heir1
LEAS 2,S
CMPD #0
LBEQ cc32
LEAY 0,S
TFR Y,D
PSHS D
JSR rvalue
LEAS 2,S
cc32
JSR loadsec
JSR pushsec
LDD 22,S
PSHS D
LDD #0
PSHS D
ADDD ,S++
ADDD ,S++
PSHS D
LDD [,S++]
STD cptr
CMPD #0
LBEQ cc33
LDD cptr
ADDD #9
PSHS D
LDB [,S++]
SEX
PSHS D
LDD #3
CMPD ,S++
BEQ *+8
LDD #0
JMP cc35 _
LDD #1
LDD cptr
ADDD #10
PSHS D
LDB [,S++]
SEX
PSHS D
LDD #2
PSHS D
LDD #2
DECB
BLT *+8
ASL 1,S
ROL ,S
BRA *-7
PULS D
CMPD ,S++
BEQ *+8
LDD #0
JMP cc35 _
LDD #1
LDD #1
cc35
CMPD #0
LBEQ cc36 _
LDD 22,S
PSHS D
LDD #2
PSHS D
ADDD ,S++
ADDD ,S++
PSHS D
LDD [,S++]
CMPD #0
LBEQ cc36 _
LDD #1
cc36
CMPD #0
LBEQ cc34
JSR doublere
cc34
cc33
JSR sub
JMP cc37
cc31
LDD #cc1+40
PSHS D
JSR match
LEAS 2,S
CMPD #0
LBEQ cc38
LEAY 0,S
TFR Y,D
PSHS D
JSR heir1
LEAS 2,S
CMPD #0
LBEQ cc39
LEAY 0,S
TFR Y,D
PSHS D
JSR rvalue
LEAS 2,S
cc39
JSR loadsec
JSR mult
JMP cc40
cc38
LDD #cc1+43
PSHS D
JSR match
LEAS 2,S
CMPD #0
LBEQ cc41
LEAY 0,S
TFR Y,D
PSHS D
JSR heir1
LEAS 2,S
CMPD #0
LBEQ cc42
LEAY 0,S
TFR Y,D
PSHS D
JSR rvalue
LEAS 2,S
cc42
JSR loadsec
JSR div
JMP cc43
cc41
LDD #cc1+46
PSHS D
JSR match
LEAS 2,S
CMPD #0
LBEQ cc44
LEAY 0,S
TFR Y,D
PSHS D
JSR heir1
LEAS 2,S
CMPD #0
LBEQ cc45
LEAY 0,S
TFR Y,D
PSHS D
JSR rvalue
LEAS 2,S
cc45
JSR loadsec
JSR mod
JMP cc46
cc44
LDD #cc1+49
PSHS D
JSR match
LEAS 2,S
CMPD #0
LBEQ cc47
LEAY 0,S
TFR Y,D
PSHS D
JSR heir1
LEAS 2,S
CMPD #0
LBEQ cc48
LEAY 0,S
TFR Y,D
PSHS D
JSR rvalue
LEAS 2,S
cc48
JSR loadsec
JSR pushsec
JSR asr
JMP cc49
cc47
LDD #cc1+53
PSHS D
JSR match
LEAS 2,S
CMPD #0
LBEQ cc50
LEAY 0,S
TFR Y,D
PSHS D
JSR heir1
LEAS 2,S
CMPD #0
LBEQ cc51
LEAY 0,S
TFR Y,D
PSHS D
JSR rvalue
LEAS 2,S
cc51
JSR loadsec
JSR pushsec
JSR asl
JMP cc52
cc50
LDD #cc1+57
PSHS D
JSR match
LEAS 2,S
CMPD #0
LBEQ cc53
LEAY 0,S
TFR Y,D
PSHS D
JSR heir1
LEAS 2,S
CMPD #0
LBEQ cc54
LEAY 0,S
TFR Y,D
PSHS D
JSR rvalue
LEAS 2,S
cc54
JSR loadsec
JSR pushsec
JSR and
JMP cc55
cc53
LDD #cc1+60
PSHS D
JSR match
LEAS 2,S
CMPD #0
LBEQ cc56
LEAY 0,S
TFR Y,D
PSHS D
JSR heir1
LEAS 2,S
CMPD #0
LBEQ cc57
LEAY 0,S
TFR Y,D
PSHS D
JSR rvalue
LEAS 2,S
cc57
JSR loadsec
JSR pushsec
JSR xor
JMP cc58
cc56
LDD #cc1+63
PSHS D
JSR match
LEAS 2,S
CMPD #0
LBEQ cc59
LEAY 0,S
TFR Y,D
PSHS D
JSR heir1
LEAS 2,S
CMPD #0
LBEQ cc60
LEAY 0,S
TFR Y,D
PSHS D
JSR rvalue
LEAS 2,S
cc60
JSR loadsec
JSR pushsec
JSR or
cc59
cc58
cc55
cc52
cc49
cc46
cc43
cc40
cc37
cc30
cc23
LDD 22,S
PSHS D
JSR store
LEAS 2,S
LDD #0
LEAS 20,S
RTS
cc1 FCB 43,61,0,45,61,0,42,61,0,47
FCB 61,0,37,61,0,60,60,61,0,62
FCB 62,61,0,38,61,0,124,61,0,94
FCB 61,0,61,0,43,61,0,45,61,0
FCB 42,61,0,47,61,0,37,61,0,62
FCB 62,61,0,60,60,61,0,38,61,0
FCB 94,61,0,124,61,0
GLOBAL heir1a
heir1a
LEAS -6,S
LEAY 4,S
TFR Y,D
PSHS D
LDD 10,S
PSHS D
JSR heir1b
LEAS 2,S
STD [,S++]
LDD #cc61+0
PSHS D
JSR match
LEAS 2,S
CMPD #0
LBEQ cc62
LDD 4,S
CMPD #0
LBEQ cc63
LDD 8,S
PSHS D
JS